package com.mall.malladminbackend.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/sys-user")
public class SysUserController {

    @PreAuthorize("hasAuthority('sys:user:edit')")
    @PutMapping
    public String edit() {
        return "edit";
    }

    @PreAuthorize("hasAuthority('sys:user:delete')")
    @DeleteMapping
    public String delete() {
        return "delete";
    }

    @PreAuthorize("hasAuthority('sys:user:add')")
    @PostMapping
    public String add() {
        return "add";
    }
}
